package com.github.postsanf.yinian.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.EditText;

import com.github.postsanf.yinian.R;

/**
 * Created by Administrator on 2016/8/14.
 */
public class TipEditText10 extends EditText {

    public TipEditText10(Context ctx, AttributeSet attrs) {
        super(ctx, attrs);
    }

    protected void onDraw(Canvas canvas) {
        Paint paint = new Paint();
        paint.setTextSize(15f);
        paint.setColor(getResources().getColor(R.color.txt_content));
        //编写提示文字。
        canvas.drawText("最多输入10个字", getWidth() - 140, getHeight() - 11, paint);
        super.onDraw(canvas);
    }


}
